// cover some element-ui styles

.el-header,
.el-main {
  padding: 0;
}

.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

.el-upload {
  input[type="file"] {
    display: none !important;
  }
}
.el-table__empty-block {
  // width: 90vw !important;
}
.el-upload__input {
  display: none;
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  position: relative;
  left: 0;
  margin: 0 auto;
  transform: none;
  .el-dialog__body {
    max-height: 70vh;
    padding: 20px 40px;
    overflow-y: auto;
  }
  .el-dialog__header {
    height: 36px;
    padding: 0 20px;
    line-height: 36px;
    background: $themeColor;
    .el-dialog__title {
      font-size: 16px;
      font-weight: bold;
      color: #FFF;
    }
    .el-dialog__headerbtn {
      top: 6px;
      font-size: 24px;
      i {
        color: #fff;
      }
    }
  }
  .el-dialog__footer {
    // height: 36px;
    padding: 0 20px;
    line-height: 36px;
    border-top: 1px solid #DCDFE6;
  }
}

.is-disabled .el-input__inner {
  color: #666 !important;
  background-color: #e8e8e8 !important;
}

.PAGE-SIZE-small .el-dialog {
  .el-dialog__header {
    height: 42px;
    line-height: 42px;
    .el-dialog__headerbtn {
      top: 7px;
    }
  }
  .el-dialog__footer {
    height: 42px;
    line-height: 42px;
  }
}

.PAGE-SIZE-medium .el-dialog {
  .el-dialog__header {
    height: 50px;
    line-height: 50px;
    .el-dialog__headerbtn {
      top: 11px;
    }
  }
  .el-dialog__footer {
    height: 49px;
    line-height: 49px;
  }
}

// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}
.el-upload--picture-card:hover,
.el-upload:focus {
  color: $themeColor;
  border-color: $themeColor;
}
// dropdown
.el-dropdown-menu {
  a {
    display: block;
  }
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}

.el-drawer__header {
  & > span,
  & > button {
    outline: none !important;
  }
}

// el-table
.el-table {
  border-right: 1px solid #EBEEF5;
  // 无边框模式下增加外边框
  border-left: 1px solid #EBEEF5;
  // 表头样式
  thead {
    color: #333;
  }
  .el-table__header {
    tr,
    th {
      background: #E5E7F2;
    }
  }
  .el-table__body {
    background-color: #fff;
  }
  td.el-table__cell,
  th.el-table__cell.is-leaf,
  .el-table--border .el-table__cell,
  .el-table__body-wrapper .el-table--border.is-scrolling-left ~ .el-table__fixed {
    border-color: #ddd;
  }
  .el-table__header tr,
  .el-table .el-table__header th {
    background: #e5e7f2;
  }
  .el-table__cell {
    .el-link--default {
      color: #126edc;
    }
    .el-link {
      margin-right: 10px;
    }
  }
  // 斑马纹样式
  &.el-table--striped .el-table__body tr.el-table__row--striped td {
    background: #EFF9FF;
  }
  // hover样式
  &.el-table--enable-row-hover .el-table__body tr:hover > td {
    background: #F5F7FA;
  }
  // 选中列样式
  &.el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
  .el-table__body tr.current-row > td {
    background: $themeColor-8 !important;
  }
  // mini版大小样式调整
  &.el-table--mini {
    th {
      padding: 4px 0;
      .caret-wrapper {
        height: 24px;
        .sort-caret.ascending {
          top: 0;
        }
        .sort-caret.descending {
          bottom: 2px;
        }
      }
    }
    td {
      padding: 2px 0;
    }
  }
  &.el-table--mini,
  &.el-table--small,
  &.el-table__expand-icon {
    font-size: 14px;
  }
  // small版大小样式调整
  &.el-table--small {
    th {
      padding: 6px 0;
    }
    td {
      padding: 4px 0;
    }
  }
  // medium版大小样式
  &.el-table--medium {
    th {
      padding: 8px 0;
    }
    td {
      padding: 6px 0;
    }
  }
}

// el-tree-select
.el-tree-select-popper {
  [aria-disabled=true] > .el-tree-node__content {
    color: #ccc !important;
  }
}

// el-select
// 增加loading样式
.el-select.el-select-loading .el-icon-arrow-up {
  animation: rotating 2s linear infinite;
  &::before {
    content: "\e6cf";
  }
}
.el-button--default:focus,
.el-button--default:hover {
  color: $themeColor;
}
.el-button--primary {
  background: $themeColor;
  border-color: $themeColor;
}
.el-button--primary:focus,
.el-button--primary:hover {
  color: #fff;
  background: $themeColor-4;
  border-color: $themeColor-5;
}
.el-button--primary.is-disabled,
.el-button--primary.is-disabled:active,
.el-button--primary.is-disabled:focus,
.el-button--primary.is-disabled:hover {
  background-color: $themeColor-6;
  border-color: $themeColor-7;
}
.el-button--text {
  color: $themeColor !important;
}
.el-button.is-plain:focus,
.el-button.is-plain:hover {
  color: $themeColor;
  border-color: $themeColor;
}
.el-link--default:hover {
  color: $themeColor !important;
}
.el-radio__input.is-checked + .el-radio__label {
  color: $themeColor;
}
.el-radio__input.is-checked .el-radio__inner {
  background: $themeColor;
  border-color: $themeColor;
}
.el-radio__inner:hover {
  border-color: $themeColor;
}

.el-tabs__item.is-active {
  color: $themeColor;
}
.el-tabs__item:hover {
  color: $themeColor;
}
.el-tabs__active-bar {
  background-color: $themeColor;
}
.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
  color: $themeColor !important;
}
.el-tabs--border-card > .el-tabs__header .el-tabs__item:hover {
  color: $themeColor !important;
}
.el-dropdown-menu__item:focus,
.el-dropdown-menu__item:not(.is-disabled):hover {
  color: $themeColor-3;
  background-color: $themeColor-10;
}
.el-tag {
  color: $themeColor;
  background-color: $themeColor-10;
  border-color: $themeColor-9;
}
.el-date-table td.end-date span,
.el-date-table td.start-date span {
  background-color: $themeColor;
}
.el-date-table td.today span {
  color: $themeColor;
}
.el-date-table td.available:hover {
  color: $themeColor;
}
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
  border-color: $themeColor;
}
.el-date-table td.current:not(.disabled) span {
  background-color: $themeColor;
}
.el-time-panel__btn.confirm {
  color: $themeColor;
}
.el-switch.is-checked .el-switch__core {
  background: $themeColor;
  border-color: $themeColor;
}
// el-step
.el-step__head.is-success {
  color: $themeColor;
  border-color: $themeColor;
}
.el-step__title.is-success {
  color: $themeColor !important;
}
.is-success .el-step__line {
  background-color: $themeColor !important;
}
.el-input.is-active .el-input__inner,
.el-input__inner:focus {
  border-color: $themeColor;
}
.el-select-dropdown__item.selected {
  color: $themeColor;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
  color: $themeColor;
}
.el-select .el-input__inner:focus {
  border-color: $themeColor;
}
.el-pagination.is-background .el-pager li.active:not(.disabled):hover {
  color: #fff !important;
}
.el-pagination.is-background .el-pager li:not(.disabled):hover {
  color: $themeColor;
}
.el-pagination button:hover {
  color: $themeColor;
}
.el-pagination__sizes .el-input .el-input__inner:hover {
  color: $themeColor;
  border-color: $themeColor;
}
.el-select .el-input.is-focus .el-input__inner {
  border-color: $themeColor;
}
.readonly {
  &.el-input-number .el-input.is-disabled .el-input__inner {
    color: #606266;
    background: #fff;
  }
}
.el-checkbox__input.is-checked .el-checkbox__inner {
  background-color: $themeColor;
  border-color: $themeColor;
}
.el-checkbox__input.is-checked + .el-checkbox__label {
  color: $themeColor;
}
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
  background-color: $themeColor;
  border-color: $themeColor;
}
.el-checkbox__inner:hover {
  border-color: $themeColor;
}
.el-loading-spinner .path {
  stroke: $themeColor;
}
.el-loading-spinner .el-loading-text {
  color: $themeColor;
}
.el-cascader-node.in-active-path,
.el-cascader-node.is-active,
.el-cascader-node.is-selectable.in-checked-path {
  color: $themeColor;
}
// el-timeline
.el-timeline-item__tail {
  border-color: #37c7ec;
}
.el-timeline-item__node {
  background: #fff;
  border: 2px solid #37c7ec;
}
.el-timeline .el-timeline-item:first-child {
  .el-timeline-item__node {
    background: #37c7ec;
    box-shadow: 0 0 3px 8px #d7f4fb;
  }
}

/* table一条合计行滚动条样式 */
//.el-table {
//  overflow: auto;
//}
//.el-table .el-table__body-wrapper,
//.el-table .el-table__header-wrapper,
//.el-table .el-table__footer-wrapper {
//  overflow: visible;
//}
//.el-table::after {
//  position: relative !important;
//}

.el-input-number .el-input__inner {
  text-align: left;
}

.el-form-item__label {
  padding: 0 6px 0 12px;
  font-weight: normal;
  label {
    font-weight: normal;
  }
}

.dialog-footer {
  .el-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}
input::-webkit-input-placeholder {  /* stylelint-disable-next-line declaration-no-important */
  color: #666 !important;
}
input::-moz-input-placeholder {
  color: #666 !important;
}
input::-ms-input-placeholder {  /* stylelint-disable-next-line declaration-no-important */
  color: #666 !important;
}
.el-input__inner {
  color: #333;
}
.el-card__header {
  .cup {
    cursor: pointer;
  }
}
